package com.crane.oss.sys.bean.request.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @author bealon
 * @email ccsu123456@qq.com
 * @date 2018年12月28日 12时22分23秒
 */
@Getter
@Setter
@ToString
@ApiModel(description = "新增用户请求")
public class AddUserRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名", name = "userName")
    @NotNull(message = "username不能为空")
    @Size(max = 50, message = "username长度超长")
    private String userName;

    @ApiModelProperty(value = "密码", name = "password")
    private String password;

    @ApiModelProperty(value = "图像地址", name = "headUrl")
    private String headUrl;

    @ApiModelProperty(value = "用户标签", name = "userLabel")
    private Integer userLabel;

    @ApiModelProperty(value = "真实姓名", name = "realName")
    @Size(max = 50, message = "realname长度超长")
    private String realName;

    @ApiModelProperty(value = "邮箱", name = "email")
    @Size(max = 100, message = "email长度超长")
    private String email;

    @ApiModelProperty(value = "性别 0 男  1女", name = "sex")
    private Integer sex;

    @ApiModelProperty(value = "手机号", name = "mobile")
    @Size(max = 20, message = "mobile长度超长")
    private String mobile;

    @ApiModelProperty(value = "状态：2正常，1锁定，0无效", name = "status")
    @NotNull(message = "status不能为空")
    private Integer status;

    @ApiModelProperty(value = "角色id列表，当前机构人员必须传入", name = "roleIdList")
    private List<Long> roleIdList;

    @ApiModelProperty(value = "创建下级机构的角色,不传为当前操作人机构", name = "partyCode", hidden = true)
    private String partyCode;

    @ApiModelProperty(value = "创建下级机构的角色类型  不传为管理员", name = "roleType", hidden = true)
    private Integer roleType;

    @ApiModelProperty(value = "创建人userId", name = "createUserId", hidden = true)
    private Long createUserId;

    @ApiModelProperty(value = "创建人机构id", name = "createPartyId", hidden = true)
    private Long createPartyId;
}
